﻿CREATE PROCEDURE [dbo].[UpdatePayRoll] 
	@empID int,
	@payperiod date,
	@percent float =NULL,
	@clientrate float =NULL,
	@actualRate float = NULL,
	@paidRate float= NULL,
	@difference float= NULL,
	@HoursWorkedCurrentMonth int= NULL,
      @HoursPaidWithHold int= NULL,
      @TotalHoursPaid  float= NULL,
      @CurrentMonthWithHoldAmount  float= NULL,
      @WithHoldBalanceForward  float= NULL,
      @SalaryFromWithHold  float= NULL,
      @PerDiem_otherPayWithHeld  float= NULL,
     
      @BalanceWithHeldAmount  float= NULL,
      @FilingFeeDeduction  float= NULL,
      @OtherAdjustment  float= NULL,
      @Total  float= NULL,

      @RequireWithHodling  nchar(10)= NULL
      
AS
BEGIN
UPDATE [EmployeeInfo].[dbo].[Payroll]

   SET 
		[Percentage]=@percent,
		[ClientRate]=@clientrate,
      [ActualRate] = @actualRate,
      [PaidRate] = @paidRate,
      [Difference] = @difference,
      [HoursWorkedCurrentMonth] = @HoursWorkedCurrentMonth,
      [HoursPaidWithHold] = @HoursPaidWithHold,
      [TotalHoursPaid] = @TotalHoursPaid,
      [CurrentMonthWithHoldAmount] = @CurrentMonthWithHoldAmount,
      [WithHoldBalanceForward] = @WithHoldBalanceForward ,
      [SalaryFromWithHold] =@SalaryFromWithHold,
      [PerDiem_otherPayWithHeld] =  @PerDiem_otherPayWithHeld ,
 
      [BalanceWithHeldAmount] = @BalanceWithHeldAmount,
      [FilingFeeDeduction] =  @FilingFeeDeduction ,
      [OtherAdjustment] = @OtherAdjustment,
      [Total] = @Total,

      [RequireWithHodling] = @RequireWithHodling 
     
 WHERE EmpID=@empid and payperiod=@payperiod
END
